<!-- 新功能探索界面 -->
<template>
  <n-button @click="handleConfirm">
    警告
  </n-button>
</template>

<script setup>
import { useDialog, useMessage } from 'naive-ui'
const dialog = useDialog();
const message = useMessage();
function handleConfirm() {
  dialog.warning({
    title: "警告",
    content: "你确定？",
    positiveText: "确定",
    negativeText: "不确定",
    onPositiveClick: () => {
      message.success("确定");
    },
    onNegativeClick: () => {
      message.error("不确定");
    }
  });
}
</script>

<style lang="scss" scoped></style>